<?php
/*require_once("auth/sso.php");
$sso = new SingleSignOn_Broker();
$users = $sso->getInfo();

if (!$users) {
    header("Location: login.php", true, 307);
    exit;
}*/
 $users["identity"]=2;
$user_active = $users["identity"];
require_once('user_assets.php');
if(!$privilege->checkAccess($user->role_id,2))
  header("Location: index.php");
$features = $privilege->getFeatures($user->role_id,2);



?>
 <script> 
    global_user.tab_newvehicle = "<?php echo (isset($features['mod_tab_newvehicle']))? 1 : 0; ?>";
         global_user.tab_bidaccepted = "<?php echo (isset($features['mod_tab_bidaacepted']))? 1 : 0 ?>";
        global_user.tab_inpossession = "<?php echo (isset($features['mod_tab_inpossession']))? 1 : 0 ?>";
       
        global_user.tab_allvehicles = "<?php echo (isset($features['mod_tab_allvehicle']))?  1 : 0 ?>";    
 </script>
<html lang="en">
   <head>
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

<title>Autogator</title>

        <script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>    
        <script type="text/javascript" src="lib/jquery-1.7.1.min.js"></script>	
		<script type="text/javascript" src="lib/bootstrap-datepicker.js"></script>
        <script type="text/javascript" src="lib/jquery.ui.core.js"></script>
		<script type="text/javascript" src="lib/jquery.ui.widget.js"></script> 
        <script type="text/javascript" src="js/slider.js"></script>
		<script type="text/javascript" src="lib/objs-2.1.1-min.js"></script>
		<script type="text/javascript" src="lib/puremvc-objs-2.0-min.js"></script>
		<script type="text/javascript" src="src/abc/MediatorNames.js"></script>
		<script type="text/javascript" src="src/abc/NotificationNames.js"></script>
		<script type="text/javascript" src="src/abc/ProxyNames.js"></script>
        <script type="text/javascript" src="src/abc/AppConstant.js"></script>
		<script type="text/javascript" src="src/controller/PrepModelCommand.js"></script>
		<script type="text/javascript" src="src/controller/PrepViewCommand.js"></script>
		<script type="text/javascript" src="src/controller/StartupCommand.js"></script>
        <script type="text/javascript" src="src/model/VehicleProxy.js"></script>
		<script type="text/javascript" src="src/model/InitialListProxy.js"></script>       
        <script type="text/javascript" src="src/model/vo/VehicleVO.js"></script>
        <script type="text/javascript" src="src/model/vo/PartnerVO.js"></script>
        <script type="text/javascript" src="src/model/vo/ReminderVO.js"></script>
	    <script type="text/javascript" src="src/view/components/UiComponent.js"></script>
		<script type="text/javascript" src="src/view/components/HomePage.js"></script>
        <script type="text/javascript" src="src/view/components/DetailPage.js"></script>
        <script type="text/javascript" src="src/view/components/ListPage.js"></script>
        <script type="text/javascript" src="src/view/components/MapPage.js"></script>
        <script type="text/javascript" src="src/view/components/AllInfoPage.js"></script>
        <script type="text/javascript" src="src/view/components/VehicleInfoPage.js"></script> 
        <script type="text/javascript" src="src/view/components/ContactInfoPage.js"></script>
        <script type="text/javascript" src="src/view/components/LocationInfoPage.js"></script> 
        <script type="text/javascript" src="src/view/components/CommentInfoPage.js"></script>
        <script type="text/javascript" src="src/view/components/PriceInfoPage.js"></script>
		 <script type="text/javascript" src="src/view/components/MessagepopPage.js"></script>
		            <script type="text/javascript" src="src/view/components/WatchPage.js"></script>
		            <script type="text/javascript" src="src/view/components/SharePage.js"></script>
        <script type="text/javascript" src="src/view/components/PrivateNotePage.js"></script>
	    <script type="text/javascript" src="src/view/HomePageMediator.js"></script>
	  	<script type="text/javascript" src="src/view/DetailPageMediator.js"></script>
        <script type="text/javascript" src="src/view/ListPageMediator.js"></script>
        <script type="text/javascript" src="src/view/MapPageMediator.js"></script>
        <script type="text/javascript" src="src/view/AllInfoMediator.js"></script>
        <script type="text/javascript" src="src/view/VehicleInfoMediator.js"></script> 
        <script type="text/javascript" src="src/view/ContactInfoMediator.js"></script>
        <script type="text/javascript" src="src/view/LocationInfoMediator.js"></script> 
        <script type="text/javascript" src="src/view/CommentInfoMediator.js"></script>
        <script type="text/javascript" src="src/view/PriceInfoMediator.js"></script> 
		 <script type="text/javascript" src="src/view/MessagepopMediator.js"></script> 
        <script type="text/javascript" src="src/view/PrivateNoteMediator.js"></script> 
		 <script type="text/javascript" src="src/view/WatchPageMediator.js"></script>
		 <script type="text/javascript" src="src/view/SharePageMediator.js"></script>
		<script type="text/javascript" src="src/ApplicationFacade.js"></script>
        <script type="text/javascript" src="js/jquery.ui.all.js"></script>
        <script type="text/javascript" src="js/jquery.layout.js"></script>	
        <script type="text/javascript" src="js/script.js"></script>	
		<script type="text/javascript" src="js/jquery.color.js"></script>
		<script src="http://code.highcharts.com/highcharts.js"></script> 
		<script src="http://code.highcharts.com/modules/exporting.js"></script> 
		<link rel="stylesheet" href="http://code.jquery.com/ui/1.9.1/themes/base/jquery-ui.css" />
		<script src="http://code.jquery.com/jquery-1.8.2.js"></script>
		<script src="http://code.jquery.com/ui/1.9.1/jquery-ui.js"></script>
		<link href="css/application.css" media="screen" rel="stylesheet" type="text/css">
			<link href="css/dashboards.css" media="screen" rel="stylesheet" type="text/css">
		 <link href="css/style.css" media="screen" rel="stylesheet" type="text/css"> 
		<script type="text/javascript">
							
		$().ready(function()
		 {               
		 
		
			$(".container").hide();
			$("div#root").removeClass("hidden");
			$("#pagePanel").hide();
                     $("#statuschange").hide();
		   if( document.location.hash )
			document.location.hash = "";
			var applicationFacade/*ApplicationFacade*/ = ApplicationFacade.getInstance();
				applicationFacade.startup( $("body") );
  $( "#datereminder" ).datepicker({ dateFormat: "yy-mm-dd" });
		 }); 
				 
	 function getUrlVars() {
    var vars = {};
    var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
        vars[key] = value;
    });
    return vars;
}
       		
			
											   
									
				</script>
                <style type="text/css">
                  .default-loader{    
                    position: relative;
                    top: 50%;
                    left: 45%;
                    margin: 100px 0;
                    z-index: 102;
                    width: 100px;
                    height: 60px;
                    text-align: center;
                    font-size:medium;
                   /* font-size: 1.5em; */
                   
                  } 
                  .nav-tabs > .active > a{
                      
                      background-color: #FAFAFA !important;
                  } 
			
                </style>       
		</head>
		 <script src="js/bootstrap-twipsy.js"></script>
		   <!--  <script src="js/bootstrap-datepicker.js"></script> -->
			<script src="js/bootstrap.min.js"></script>
			<script type="text/javascript"> current_page = "vehicle_list";</script>
                        <script type="text/javascript" src="lib/bootbox.min.js"></script>
<body >
	
   <!--  <script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script> -->
    
    
	<div id="root" class="hidden">
		<div id="wrapper">
                            <?php include_once $header_path; ?>
			<div id="content">
				<div class="container">
                       
                               <div id="vehicle-list-page" class='section' >
                                  
                                      <!-- <div class='section-header'> -->
                                     <?php if($user->role_id!=8){ ?>
                                    
                                    
                                          <ul id="vehicle-tabs" class="nav nav-tabs" style="margin:20px 20px -1px 20px;">
                                                <?php  if(isset($features['mod_tab_newvehicle'])) { ?> 
                                              <li id="new-vehicle-component"><a href="javascript:void();">New Vehicles&nbsp;<span id="ns-m-count" class="badge badge-info"></span>&nbsp;<span id="ns-count" class="badge badge-warning"></span></a></li>
                                                <?php  } ?>  
                                                 <?php  if(isset($features['mod_tab_bidaacepted'])) { ?> 
                                                <li id="bidaccepted-vehicle-component"><a href="javascript:void();">Bid Accepted&nbsp;<span id="ba-m-count" class="badge badge-info"></span>&nbsp;<span id="ba-count" class="badge badge-warning"></span></a> </li>
                                                  <?php  } ?>  
                                                <?php  if(isset($features['mod_tab_inpossession'])) { ?> 
                                                <li id="inpossesion-vehicle-component"><a href="javascript:void();">In Possession&nbsp;<span id="nip-m-count" class="badge badge-info">0</span>&nbsp;<span id="nip-count" class="badge badge-warning">0</span></a> </li>
                                                 <?php  } ?>  
                                              <?php  if(isset($features['mod_tab_allvehicle'])) { ?>
                                                   <li id="all-vehicle-component"><a href="javascript:void();">All Vehicles&nbsp;<span id="all-m-count" class="badge badge-info"></span>&nbsp;<span id="all-count" class="badge badge-warning"></span></a> </li>
                                              <?php  } ?>    
                                            </ul>
                                         <?php }else{ ?>
					    <ul id="vehicle-tabs" class="nav nav-tabs" style="margin:20px 20px -1px 20px;">
                                            <!--  <li id="ta-new-vehicle-component"><a href="#">New Vehicles&nbsp;</a></li>
                                                <li id="ta-progress-vehicle-component"><a href="#">Vehicle In Progress&nbsp;</a></li>
                                                <li id="ta-delivered-vehicle-component"><a href="#">Delivered Vehicles&nbsp;</a></li> -->
                                                <li id="ta-all-vehicle-component"><a href="#">All Vehicles&nbsp;</a></li>
                                                
                                            </ul>
                                      <div id="statuschange" class="alert alert-success" style="position:absolute;top:86px;left:500px;width:300px;text-align:center;"></div>
										 <?php } ?>
                                            <!-- <ul><li><a href="/453a3e08f1/vehicles/new" class="add">Add a Vehicle</a></li></ul> -->
                                        <!-- </div> -->
										<!--BELOW LINE BFOR EDIT:<div class="section-header" <?php if($user->adminType!="Tower Administrator") {?> style=" border-top-color: #CCC; -webkit-border-top-right-radius: 0;
                                                border-top-right-radius: 0; -webkit-border-top-left-radius: 0; border-top-left-radius: 0;" <?php }?> >-->
												
                                           <div class="section-header" style=" border-top-color: #CCC; -webkit-border-top-right-radius: 0;
                                                border-top-right-radius: 0; -webkit-border-top-left-radius: 0; border-top-left-radius: 0;">
                                    
                                              <ul style="float:left; margin-top:2px;">
                                                  <li>
                                                      <div class="btn-group" data-toggle="buttons-radio">
                                                          <button id="vehicle-list_button" class="btn active"><i class="icon-align-justify"></i></button>
                                                          <button id="map-list_button" class="btn"><i class="icon-map-marker"></i><!--<img src="images/map_button.png" width="auto" height="30px">--></button>
                                                          
                                                         
                                                      </div>
                                                    <!--  <div  id="map-list_button" style="text-align:center;"><img src="images/map_button.png" width="auto" height="30px"></div> -->
                                                  </li>
                                                  <li>
                                                     <div id="add-new" style="font-weight:bold">
                                                         <span id="page-status-count"></span>
                                                      </div>
                                                  </li>
                                               
                                                  
                                              </ul>
                                             <?php  if($user->role_id!=8) {?>
                                               <ul style='margin-top:8px;'>
                                                   <li>
                                                        
                                                       <a href="info_page.php" id="addnew_top" class="btn btn-primary" style="color:white;font-size: 11px; font-weight: normal;" >Add a Vehicle</a>
                                                    </li>
                                               </ul>
                                             <?php } ?>
                                              <ul style='margin-top:2px;'>
                                                   
                                                  
                                                    <li>
                                                         
                                                             <select class="search-query span2" name="c" id="c" style="width: 190px;height: 30px"></select>
                                                       
                                                    </li>
                                                    <li>
                                                       
                                                           
                                                   
                                                            <input type="text" class="search-query span2" style="height:30px" data-provide="" data-source="" id="s" placeholder="Search Vehicles...."/>
                                                            <button class="btn" id="searchSubmit" style="font-size: 11px; font-weight: normal;" type="button"><i class="icon-search"></i></button>
                                                       <button class="btn" id="btn_refresh" type="button"><i class="icon-refresh"></i></button>
                                                       
                                                    </li>
                                                    <li>
                                                        
                                                    </li>
                                                   
                                                    
                                                        
                                              </ul>
                                              
                                             
                                              
                                          </div>
                                        
                                          <div class='section-body'>
                                             <!-- <table><tr><td>  <a href='#' class='btn btn-large btn-danger popup-marker' data-content='And heres some amazing content. Its very engaging. right?' title='A Title'  >Click to toggle popover</a></td></tr></table> 
                                                <a href='#' class="popup-marker"  rel='popover' data-content='dsfsd' >dsadas</a> 
                                                 <a href='#' class="popup-marker"  rel='popover' data-content='dsfsd' >dsadas</a> -->
                                              <div id="vehicle-list-area">  
                                                   <?php  if($user->role_id!=8) {?>
                                                  <div class='well well-small' style='margin-bottom: 5px; min-height: 5px;'>
                                                       
                                                      <table>
                                                          <tr  style="font-size:12px; height: 4px;"><td width="35px;"></td><td width="48px;" style="padding:8px;"></td><td style="padding:8px;" width="227px;"><u><a href='javascript:void();' id='v-id-sort'>Vehicle Id/</a><a href='javascript:void();' id='v-year-sort'> Year/</a><a href='javascript:void();' id='v-make-sort'> Make/</a><a href='javascript:void();' id='v-model-sort'> Model</a></u></td><td style="padding:8px;" width="144px;"><u><a href='javascript:void();' id='v-seller-sort'>Seller</a></u></td><td  style="padding:8px;"width="136px;"><u><a href='javascript:void();' id='sortState'>State/</a><a href='javascript:void();' id='v-city-state-sort'> City</a></u></td><td style="padding:8px;" width="180px;"><u><a href='javascript:void();' id='v-updated-sort'>Submit Date/</a><a href='javascript:void();' id='v-assist-sort'> By</a></u></td><td  style="padding:8px;" width="116px;"><u><a href='javascript:void();' id='v-price-sort'>Asking Price</a></u></td><td style="padding:8px;" width="196px;"><u><a href='javascript:void();' id='sortStatus'>Status</a></u></td><td></td></tr>
                                                      </table>
                                                      
                                                  </div> 
                                                  <?php } ?>
                                                          
                                                         <!-- ================================== Vehicle List =============================== -->
                                                        <!-- =============================================================================== -->
                                                        
                                                           <div class="page-list" id="vehicle-list-component">
                                                                    <div class="default-loader">
                                                                        
                                                                        
                                                                    
                                                                    </div>
                                                            </div>

                                                        <!-- =============================================================================== -->


                                                  
                                                           <!-- Page map -->
                                            
                                                  <div id="page-map" class="page-map" style="visibility: visible; margin-bottom: 18px;"> 
                                                             <div style="width:100%; height:520px">
                                                            <div style="width: 25%; float:left">
                                                                    <!-- =============================================================================== -->
                                                                <!-- ================================== Home Page Header =========================== -->
                                                                <!-- =============================================================================== -->

                                                                    <div class="section" style="width: 94%;">
                                                                        <div class="section-header">
                                                                            <h5>New Submission</h5>
                                                                           
                                                                        </div>  

                                                                            <div id="non-replies-list" style="overflow:auto; height:200px; width:100%;border-radius:5px;"></div>

                                                                    </div>

                                                                <!-- =============================================================================== -->
                                                                <!-- ================================== Home Page Header =========================== -->
                                                                <!-- =============================================================================== -->
                                                                <div class="section" style="width: 94%;">
                                                                    <div class="section-header">
                                                                        <h5>Replies</h5>
                                                                    </div>

                                                                    <div id="replies-list" style="overflow:auto; height:203px; width:100%; border-radius:5px;"></div>
                                                                </div>
                                                            </div>
                                                            <!-- =============================================================================== -->
                                                            <!-- ================================== Home Page Header =========================== -->
                                                            <!-- =============================================================================== -->
                                                            <div id="map-content" class="section gmap3"></div>
                                                        </div>
                                                    </div>
                                             
                                              
                                              <!-- End page map --> 
                                                  
                                                      <div id="pagePanel" style="height:40px; width:99.9%;">
                                                        <div id="pagination" class="jpaginate " style=" float:right;"></div>
                                                        <!-- =============================================================================== -->
                                                        <!-- ================================== Pagenation Panel =========================== -->
                                                        <!-- =============================================================================== -->
                                                        <script src="js/jquery.paginate.js" type="text/javascript"></script>
                                                   </div>
                                                  <?php if($user->role_id!=8){ ?>   
                                                 <div class='form-actions'>
                                                     
                                                        <div class='row-fluid'>
                                                           
                                                               <div class='span2' style="float:left; margin-top:10px;">
                                                                   <a id="addnew_bottom" style="float:right;" href="info_page.php" class="btn btn-primary">Add a Vehicle</a>
                                                                </div>
                                                            <div class='span2'></div>
                                                            <div class='span2'>
                                                                <div class='ac stat-block' style='margin-bottom:0'>
                                                                <h3>250</h3>

                                                                <h6 class='stat-heading'>Total Vehicles</h6>
                                                                </div>
                                                            </div>
                                                            <div class='span2'>
                                                                <div class='ac stat-block' style='margin-bottom:0'>
                                                                <h3>250</h3>

                                                                <h6 class='stat-heading'>Total Vehicles</h6>
                                                                </div>
                                                            </div>
                                                            <div class='span2'>
                                                                <div class='ac stat-block' style='margin-bottom:0'>
                                                                <h3>$1900</h3>

                                                                <h6 class='stat-heading'>Total Paid Price</h6>
                                                                </div>
                                                            </div>
                                                            <div class='span2'>
                                                                <div class='ac stat-block' style='margin-bottom:0'>
                                                                <h3>$2500</h3>

                                                                <h6 class='stat-heading'>Total Paid Price</h6>
                                                                </div>
                                                            </div> 
                                                        </div>
                                                     
                                                </div> 
                                              <?php } ?>
                                          </div>      
                                               
                                                

                                        </div>        
                                       
                               </div>
                               
                               
                              
                            </div>
             </div>
         
        
      </div>   
   </div>
  <?php require_once 'popup_modals/watchlist-modal.php';   ?> 
  <?php require_once 'popup_modals/privatenote-modal.php';   ?> 
  <?php require_once 'popup_modals/correspondence-modal.php';   ?> 
    <?php require_once 'popup_modals/message-modal.php';   ?> 
     <?php require_once 'popup_modals/share-modal.php';   ?> 
    
		
			<div align="center" style="position:absolute;top:45%;left:40%;width:20%;"  id="progresslistpage">
				<div style="font-size: 17px;">Loading...</div>
				
				<div   class="progress progress-striped active">
																<div class="bar" style="width:100%;"></div>
															</div>   
											
			</div>   
			<div id="statusadminchange" class="alert alert-success" style="position: absolute; top: 70px; left: 900px; width: 300px; text-align: center; display:none;"></div>
															
</body>
</html>